<% @page_title = "List all Faculties" %>
<%= stylesheet_link_tag "admin/list-items", :media => "all" %>
<div class="list-faculties">
	<h1>List all Faculties</h1>
	<table>
		<tr>
			<th>ID</th>
			<th>Faculty Name</th>
			<th class='action'>Action</th>
		</tr>
		<% order = 0 %>
		<% @faculties.each do |faculty| %>
			<tr <% if order % 2 == 0 %><%= "class='alt'" %><% end %> ><% order += 1 %>
				<td class='id'><%= faculty.id %></td>
				<td><%= link_to faculty.faculty_name, :controller => "admin/faculty", :action => "view", :id => faculty.id %></td>
				<td class='action'>
					<%= link_to image_tag('icons/view-icon.png'), :controller => "admin/faculty", :action => "view", :id => faculty.id %>&nbsp;
					<%= link_to image_tag('icons/edit-icon.png'), :controller => "admin/faculty", :action => "edit", :id => faculty.id %>&nbsp;
					<%= link_to image_tag('icons/delete-icon.png'), {:controller => "admin/faculty", :action => "delete", :id => faculty.id}, :method => "delete", :data => {:confirm => "Are you sure?"} %>
				</td>
			</tr>
		<% end %>
	</table>
	<div class='paginator' style='margin-left:100px'><%= will_paginate @faculties %></div>
</div><!-- End .list-faculties -->
